4D Analytics

Calculation Designer Overview

The Calculation Designer is a means of configuring a wide variety of calculations as simple or as complex as they need to be.

Accessing the Calculation Designer is done by either selecting the calculation parameter in the treeview, right clicking and selecting it, or adding the point to the selection window and clicking the Calculation Designer icon.

The calculation designer icon will only be enabled if a single calculated parameter point has been selected in the selection tool.

Select the point to be configured and open the calculation window.

Points which are to be used in the calculation, can be added by dragging them from the treeview and dropping them either in the formula window or in the list of points. If added to the formula window, the point will also be listed in the list of points.

Generic Points, Process Parameters and Calculated Points can be used in calculations.

Point List

The point list displays the following information for each point. The calculation that is being worked on will always be at the top of the list.

  • Reqd: Check this to set the point to be a required point.
  • Type: The point type.
  • Name: The point name.
  • Point ID: The unique point ident.
  • Fullpath: This tells you where about in the hierarchy structure the point is.
  • In Use: Get set to Yes if the point is used in the calculation.
  • Key Point: Indicates if the point is a Key Point.
  • Add: Click on this to add the point to the formula window.

Add Points to the Formula

To add points to the formula:

  • Drag and drop from the tree view,
  • Double-click on the point in the point list
  • Click the Add icon

When a point has been added to the formula window it will be displayed as:

{PPointIdent} – e.g., Point Ident 10 would be displayed as {P10}, Point Ident 255 would be displayed as {P255}.

Calculation Formula

Users can type in formulas to the formula window.

There are toolbars with various mathematical formulas in them. Using these, will give the user the starting formula.

For example, if we clicked on ‘Max’, the following would be added to the formula window:

  • Max[ ]

The user would then have to put the points within the square brackets.

Click the Save icon to save the changes.

There are a lot of math icons available and a full description of these can be found in the calculation document.

Required Point

If the reqd (required point) box is checked, this means that the calculation will only ever be performed when new data is received for this point. In the majority of cases a tick is required i.e. you only want to do the calculation when new data is available.

An example of where you would not tick the Reqd box is if you were doing a calculation that included a constant in the equation. This value would only ever be stored once in the database. In this case, there would only ever be one value for this point and new data would never appear therefore it would not have the Reqd box ticked.

Key Point

The frequency that a calculation is performed is specified by setting calculation interval, e.g., weekly, monthly etc. This means that the calculation is performed only at this interval.

The key point allows the specification of a calculation to be performed whenever there is new data for the key point, specifically regarding a timestamp. For example, with a calculation which says {P1} + {P2) and the key point is set as {P1} then the calculation will be executed for every timestamp that {P1} has a data value regardless of how regular or irregular that is.

To make a point a key point, select the point in the Points window and click on the key point icon in the toolbar.

When a point is selected and the Key Point button is selected, then the Key Point column in the Point List will indicate a ‘Yes’.

Calculation Configuration Options

Further configuration options are available by clicking on the configuration icon in the toolbar.

The configuration window will open.

The configuration settings need to be set for each individual calculation. The Configuration process is divided into 4 sections. Once changes are applied, click on the Save button to apply them.

Note: If the save button is not clicked within this window then any changes made in here will not be saved.

Calculation Configuration

  • General:
    • This section contains the Calculation Sequence Number, which is used for calculations that rely on the output of previous calculations. For example, you may have a point in your calculation that is a calculated parameter itself. To calculate the correct results, the calculated parameter point would have to be calculated first before it could be used to calculate this new calculation. If the sequence numbers are not populated, or to help the user establish the correct sequence, then the Calculation Sequence Checker can be used.
    • The Calculate New Value Every function allows you to decide how often the calculation is calculated. This currently defaults to once a day, but this may be changed to Minutes, Hours, Days, Weeks, or Years. When the calculator runs, it will create a new value to match the frequency of this setting.
    • Choosing the Manual radio button will allow you to run all of your calculations manually, or you can leave it as Automatic.
  • Number of Samples for Statistical Calculations – The Statistical section allows the configuration of the number of samples in terms of data values for statistical calculations. The number of samples can relate to all available data, a last number of values, or last number of values over minutes, hours, days, weeks, months, or years.
  • Reset Calculation Property – The Resetting section allows the calculation value to be reset to a certain value at intervals of minutes, weeks, months, quarters or years, if required. To enable this function select Reset Calculation value at interval box. This will enable the Reset calculation value at interval, Reset calculation to value and Start from: options to be modified accordingly.
  • Trig Functions – The Trig Functions section configures any trigonometric calculations to be in either degrees or radians.